package z.explorer.ui.component.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import z.explorer.ui.component.login.Login;

public class ZMenuBar extends JMenuBar {

	private static final long serialVersionUID = -804277667051164741L;
	
	private JMenu menuProgram = new JMenu("Program");

	private JMenuItem menuItemLogin = new JMenuItem("login");

	private JMenuItem menuItemProfile = new JMenuItem("profile");

	private JMenuItem menuItemExit = new JMenuItem("Exit");

	public ZMenuBar() {
		menuProgram.add(menuItemLogin);
		menuItemLogin.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				Login login = new Login(Login.LOGIN);
			}

		});
		menuProgram.add(menuItemProfile);
		menuItemProfile.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				Login login = new Login(Login.PROFILE);
			}

		});
		menuProgram.add(menuItemExit);
		add(menuProgram);

	}
}
